package face.threaddemo;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

import demo.java8.Person;

/**
 * Created by zhangyanfei on 2019/6/26.
 *
 * @author zhangyanfei
 * @date 2019/06/26
 */
public class Storage {
    public static final int MAX_SIZE = 10;
    private LinkedList<Person> personList = new LinkedList<>();

    public void set(Person person) {
        personList.add(person);
    }

    public Person get() {
        return personList.remove();
    }

    public int size() {
        return personList.size();
    }
}
